package iterator;

import iterator.iterator.TVIterator;
import iterator.television.Television;
import iterator.utils.XMLUtil;

public class Client {
    public static void main(String[] args) {
        Television television = (Television) XMLUtil.getBean();
        TVIterator iterator = television.getIterator();
        System.out.println("电视机频道:");
        while(!iterator.isLast()){
            System.out.println("\t" + iterator.currentChannel().toString());
            iterator.next();
        }
    }
}
